<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<h1>登录</h1>
<button onclick="login()">登录</button>

<script type="text/javascript">

    function login() {
        location.href = document.referrer;
    }

</script>
</body>
</html>